package com.base.test.rabbitmq.utils;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.core.RabbitAdmin;

/**
 * RabbitMq工具类
 * @author qiaodong
 * @since 2020-04-09
 */
public class RabbitMqUtil {

    public static void createRabbitAdmin(Exchange exchange,Queue queue,
                                         Binding binding,RabbitAdmin rabbitAdmin){
        rabbitAdmin.declareExchange(exchange);
        rabbitAdmin.declareQueue(queue);
        rabbitAdmin.declareBinding(binding);
    }
}
